//
//  PTHomeViewController.m
//  PuTie
//
//  Created by 周宏全 on 2017/7/14.
//  Copyright © 2017年 周宏全. All rights reserved.
//

#import "PTHomeViewController.h"
#import "PTDrawViewController.h"
#import "PTFunctionViewController.h"
#import "Masonry.h"


@interface PTHomeViewController ()

@end

@implementation PTHomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // 添加视图
    [self addView];
    
}

#pragma mark - 添加视图
- (void)addView {
    
    PTDrawViewController *drawVC = [[PTDrawViewController alloc] init];
    [self addChildViewController:drawVC];
    [self.view addSubview:drawVC.view];
    [drawVC didMoveToParentViewController:self];
    
    PTFunctionViewController *functionVC = [[PTFunctionViewController alloc] init];
    [self addChildViewController:functionVC];
    [self.view addSubview:functionVC.view];
    [functionVC didMoveToParentViewController:self];
    
    [functionVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.bottom.right.equalTo(self.view);
        make.height.equalTo(@284);
    }];
    
    [drawVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_topLayoutGuideBottom);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(functionVC.view.mas_top);
    }];
    
}

@end
